<template>
  <div>
    <grid-view
      :cols="3"
      :lineSpace="15"
      :v-margin="20"
      v-if="subcategories.list"
    >
      <div
        class="item"
        v-for="(item, index) in subcategories.list"
        :key="index"
      >
        <a :href="item.link">
          <div class="item-img">
            <img class="item-image" :src="item.image" alt="" v-lazy="item.image"/>
          </div>
          <div class="item-text">{{ item.title }}</div>
        </a>
      </div>
    </grid-view>
  </div>
</template>

<script>
import GridView from "components/common/gridview/GridView";

export default {
  name: "TabContentCategory",
  components: {
    GridView,
  },
  props: {
    subcategories: {
      type: Object,
      default() {
        return [];
      },
    },
  },
};
</script>

<style scoped>
.panel img {
  width: 100%;
}

.item {
  text-align: center;
  font-size: 12px;
}

.item-img {
  width: 90%;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid seashell;
  box-shadow: 4px 6px 10px #95a5a6;
}

.item-image {
  width: 100%;
}

.item-text {
  margin-top: 15px;
}
</style>
